package com.idress.utils;

import org.apache.shiro.crypto.hash.Md5Hash;

public class EndecryptUtils {

	/**
	 * @param password 需要加密的密码	
	 * @param salt     干扰因素
	 * @param hashIterations 加密次数
	 * @return
	 */
	public static String endecrypt4shiro(String password,Object salt,int hashIterations){
		Md5Hash hash = new Md5Hash(password,salt,hashIterations);
		return hash.toString();
	}
	
	public static void main(String[] args) {
//		ba4a91f39c4eecd7ba0b0a7fafaa24c0
		System.err.println(endecrypt4shiro("111111","admin",2));
		//System.err.println("cd1205a58536c3e37cfe840f4d80749d".length());
	}
}
